function MakeMethods(prefix){
	prefix = prefix || "_";
	var a = new Array;
	for( var i=0; i < attributes.length; i++ )
		if( attributes[i].name.indexOf(prefix) == 0 )a.push(attributes[i].name);
	for( var i = 0; i < a.length; i++ )
		eval(a[i].substr(1)+' = makeMethod("'+a[i]+'")')
}
function makeMethod(attrName){
	var funcBody = getAttribute(attrName);
	try{
		if( typeof(eval(funcBody)) == "function" )return eval(funcBody);
	}catch(e){}
	return new Function("e",funcBody);
}
function makeEventHandlerLocal(eventHandler){
	var inside = (eventHandler+"").match(/\{([\s\S]+)\}/)[1];
	return eval(trim(inside).match(/\w+/)[0]);
}

function filterRowID(element,rs){
	if( !rs().State )return setTimeout(function(){ return filterRowID(rs) },1000);
	var rowID = parseInt(element.getAttribute("RowID"));
	if( isNaN(rowID) )return alert("Can't find RowID in "+element.tagName)
	var rowIDField = element.getAttribute("RowIDField");
	if( !rowIDField )return alert("Can't find RowIDField in "+element.tagName)
	for( rs().MoveFirst(); !rs().EOF && !rs().BOF; )
		if( rs()(rowIDField).value == rowID )rs().MoveNext();
		else rs().Delete();
	if( !rs().recordcount )return alert("ATTANTION!\n\nEmpty record in "+element.tagName+"("+rowID+")");
	rs().MoveFirst();
}
